package com.aaa.vegetablemarketexpress.service;

import com.aaa.vegetablemarketexpress.dao.VarietyDao;
import com.aaa.vegetablemarketexpress.entity.Variety;
import com.aaa.vegetablemarketexpress.util.Page;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * @FileName: VarietyService
 * @Description:
 * @Author: qxh
 * @CreateTime: 2025/9/8 11:35
 * @Version: 1.0.0
 */
public interface VarietyService {
    /**
     * @Description: 根据VarietyId查询Variety
     * @Param: varietyId
     * @return: Variety
     */
    Variety queryByVarietyId(Long varietyId);
    /**
     * @Description: 查询Variety列表
     * @Param: variety
     * @return: List<Variety>
     */
    PageInfo queryByParam(Page<Variety> page);
    /**
     * @Description: 根据VarietyName查询Variety
     * @Param: varietyName
     * @return: Variety
     */
    Variety queryByVarietyName(String varietyName);
    /**
     * @Description: 新增Variety
     * @Param: variety
     * @return: int
     */
    int insertVariety(Variety variety);
    /**
     * @Description: 修改Variety
     * @Param: variety
     * @return: int
     */
    int updateVariety(Variety variety);
    /**
     * @Description: 删除Variety
     * @Param: varietyId
     * @return: int
     */
    int deleteVariety(Long varietyId);
    /**
     * @Description: 检查Variety是否被使用
     * @Param: varietyId
     * @return: int
     */
    int checkVarietyUsed(Long varietyId);
    /**
     * @Description: 修改Variety状态
     * @Param: varietyId,status
     * @return: int
     */
    int updateVarietyStatus(Long varietyId, String status);
    /**
     * @Description: 查询所有正常Variety
     * @Param:
     * @return: List<Variety>
     */
    List<Variety> queryAllNormalVariety();
}
